home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / bfd / host-aout.c < prev    next >
C/C++ Source or Header  |  1994-03-15  |  2KB  |  80 lines

  1. /* BFD backend for local host's a.out binaries
  2.    Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
  3.    Written by Cygnus Support.  Probably John Gilmore's fault.
  4.  
  5. This file is part of BFD, the Binary File Descriptor library.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #include "bfd.h"
  22. #include "sysdep.h"
  23. #include "libbfd.h"
  24.  
  25. #define    ARCH_SIZE    32
  26.  
  27. /* When porting to a new system, you must supply:
  28.  
  29.     HOST_PAGE_SIZE        (optional)
  30.     HOST_SEGMENT_SIZE    (optional -- defaults to page size)
  31.     HOST_MACHINE_ARCH    (optional)
  32.     HOST_MACHINE_MACHINE    (optional)
  33.     HOST_TEXT_START_ADDR    (optional)
  34.     HOST_STACK_END_ADDR    (not used, except by trad-core ???)
  35.     HOST_BIG_ENDIAN_P    (required -- define if big-endian)
  36.  
  37.    in the ./hosts/h-systemname.h file.  */
  38.  
  39. #ifdef            HOST_PAGE_SIZE
  40. #define    PAGE_SIZE    HOST_PAGE_SIZE
  41. #endif
  42.  
  43. #ifdef            HOST_SEGMENT_SIZE
  44. #define    SEGMENT_SIZE    HOST_SEGMENT_SIZE
  45. #else
  46. #define    SEGMENT_SIZE    PAGE_SIZE
  47. #endif
  48.  
  49. #ifdef            HOST_TEXT_START_ADDR
  50. #define    TEXT_START_ADDR    HOST_TEXT_START_ADDR
  51. #endif
  52.  
  53. #ifdef            HOST_STACK_END_ADDR
  54. #define    STACK_END_ADDR    HOST_STACK_END_ADDR
  55. #endif
  56.  
  57. #ifdef            HOST_BIG_ENDIAN_P
  58. #define    TARGET_IS_BIG_ENDIAN_P
  59. #else
  60. #undef  TARGET_IS_BIG_ENDIAN_P
  61. #endif
  62.  
  63. #include "libaout.h"           /* BFD a.out internal data structures */
  64. #include "aout/aout64.h"
  65.  
  66. #ifdef HOST_MACHINE_ARCH
  67. #ifdef HOST_MACHINE_MACHINE
  68. #define SET_ARCH_MACH(abfd, execp) \
  69.   bfd_default_set_arch_mach(abfd, HOST_MACHINE_ARCH, HOST_MACHINE_MACHINE)
  70. #else
  71. #define SET_ARCH_MACH(abfd, execp) \
  72.   bfd_default_set_arch_mach(abfd, HOST_MACHINE_ARCH, 0)
  73. #endif
  74. #endif /* HOST_MACHINE_ARCH */
  75.  
  76. #define MY(OP) CAT(host_aout_,OP)
  77. #define TARGETNAME "a.out"
  78.  
  79. #include "aout-target.h"
  80.